import request from '@/config/axios'

// 职位 VO
export interface RecruitmentPositionVO {
}

// 职位 API
export const RecruitmentPositionApi = {
  queryStatistics: async() => {
    return await request.get({url: '/hospital/recruitment-position/get-statistics'})
  },
  // 查询职位分页
  getRecruitmentPositionPage: async (params: any) => {
    return await request.get({ url: `/hospital/recruitment-position/page`, params })
  },

  // 查询职位详情
  getRecruitmentPosition: async (id: number) => {
    return await request.get({ url: `/hospital/recruitment-position/get?id=` + id })
  },

  // 新增职位
  createRecruitmentPosition: async (data: RecruitmentPositionVO) => {
    return await request.post({ url: `/hospital/recruitment-position/create`, data })
  },

  // 修改职位
  updateRecruitmentPosition: async (data: RecruitmentPositionVO) => {
    return await request.put({ url: `/hospital/recruitment-position/update`, data })
  },

  // 删除职位
  deleteRecruitmentPosition: async (id: number) => {
    return await request.delete({ url: `/hospital/recruitment-position/delete?id=` + id })
  },

  // 导出职位 Excel
  exportRecruitmentPosition: async (params) => {
    return await request.download({ url: `/hospital/recruitment-position/export-excel`, params })
  },

  // 获取候选人分页
  getRecruitmentResumePage: async (params: any) => {
    return await request.get({ url: `/hospital/recruitment-resume/page`, params })
  },

  // 获取候选人分页
  getRecruitmentInterviewPage: async (params: any) => {
    return await request.get({ url: `/hospital/recruitment-interview/page`, params })
  },

  // 获取候选人分页
  delRecruitmentInterviewPage: async (id: number) => {
    return await request.delete({ url: `/hospital/recruitment-interview/delete?id=` + id })
  },
  

  // 获取候选人
  getCandidates: async (id: number) => {
    return await request.get({ url: `/hospital/recruitment-resume/getCandidates?positionId=` + id  })
  },
}